package fr.blogger.web.bean.module;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;

import fr.blogger.ejb.facade.BlogFacade;
import fr.blogger.ejb.model.Blog;

@Named
@ViewScoped
public class RechercherBlogBean implements Serializable {

	@Inject
	private BlogFacade blogFacade;
	private String nom;
	private List<Blog> listeBlog = new ArrayList();

	public RechercherBlogBean() {
	}

	public void rechercher() {
		listeBlog = blogFacade.findByBlogSearch(nom);
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public List<Blog> getListeBlog() {
		return listeBlog;
	}

	public void setListeBlog(List<Blog> listeBlog) {
		this.listeBlog = listeBlog;
	}

}
